package com.imooc.mall.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum  ResultEnum {

    /**
     * 成功
     */
    SUCCESS(0,"success"),
    /**
     * 失败
     */
    FAILED(1,"failed"),

    NEED_LOGIN(10,"用户未登录，请先登录"),


    /**
     *未知错误
     */
    UNKNOWN(-1,"服务端错误"),
    /**
     *id不存在
     */
    NOT_EXIST_ID(4,"要查询的id不存在"),

    NULL_POINT_EXCEPTION(5,"空指针异常"),
    INDEX_OUT_BOUNDS_EXCEPTION(6,"下标超出异常"),
            ;
    private Integer code;
    private String msg;
}
